]> dgit.raspbian.org Git - gnome-shell.git/commit
st/icon: Automatically update on icon theme changes
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 23 Jan 2024 20:20:51 +0000 (21:20 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 26 Jan 2024 23:36:25 +0000 (23:36 +0000)
commit671c242958772f22de287d9bf6e13ad01f3e44b2
tree3dea97b918a2054b0d2bb8ea4c7b50ecd876511e
parente97175d2bf4e7c9d505ff28762fc7641fe219c7d
st/icon: Automatically update on icon theme changes

St.Icon is very commonly used for displaying themed icons, yet so
far updating the icon on icon theme changes is left to the caller.

Unsurprisingly, very few actually do that, with the result that
for most icons, icon theme changes only take effect after a delay
(say, a color change on hover) or not at all.

This is also inconsistent with GTK, where Gtk.Image will automatically
pick up icon theme changes.

Address this by tracking whether the current icon corresponds to
a themed icon, and update it automatically on theme changes if
it does.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3141>
src/st/st-icon.c